package grailsforum

class Thread {

    String name
    Date created

    static constraints = {
        name(blank: false, nullable: false, minSize: 2)
        created(nullable: false)
    }

    static hasMany = [threadTags: ThreadTag, posts : Post]
    static belongsTo = [course: Course]

    static mapping = {

        posts sort: 'position'
        tags cascade: 'none'
    }



}
